package com.edgclub.edg.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

import com.edgclub.edg.R;
import com.edgclub.edg.utils.util.BitmapUtility;


public class EmptyTopicAdapter extends BaseAdapter {

	private Context context;

	private int position;
	
	private ImageView imageView;

	public EmptyTopicAdapter(Context context, int position) {
		this.context = context;
		this.position = position;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 1;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int arg0, View view, ViewGroup arg2) {

//		if (position == 0) {
//			view = LayoutInflater.from(context).inflate(
//					R.layout.layout_gz_emptytopic, null);
//		} else if (position == register_1) {
//			view = LayoutInflater.from(context).inflate(
//					R.layout.layout_gz_emptyreplay, null);
//		} else if (position == 2) {
//			view = LayoutInflater.from(context).inflate(
//					R.layout.layout_gz_emptyreplayme, null);
//		}else if(position == InterestConstant.EMPTY_TYPE_COLLECTION){
//			view = LayoutInflater.from(context).inflate(
//					R.layout.layout_gz_emptytopic, null);
//			imageView = (ImageView) view.findViewById(R.id.imageView1);
//			imageView.setImageResource(R.drawable.topic_collection_empty);
//		}
		view = LayoutInflater.from(context).inflate(
				R.layout.layout_gz_emptytopic, null);
		imageView = (ImageView) view.findViewById(R.id.imageView1);
		if(position==10)
			imageView.setImageBitmap(BitmapUtility.readBitmap(
				context, R.drawable.emptytopic2));
		else {
			imageView.setImageBitmap(BitmapUtility.readBitmap(
					context, R.drawable.emptytopic));
		}
		return view;

	}
}
